package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PRolePermissionMapper;
import syllabus.model.Criteria;
import syllabus.model.PRolePermission;
import syllabus.service.PRolePermissionService;

@Service
public class PRolePermissionServiceImpl implements PRolePermissionService {
    @Autowired
    private PRolePermissionMapper pRolePermissionMapper;

    private static final Logger logger = LoggerFactory.getLogger(PRolePermissionServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pRolePermissionMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PRolePermission selectByPrimaryKey(Integer id) {
        return this.pRolePermissionMapper.selectByPrimaryKey(id);
    }

    public List<PRolePermission> selectByExample(Criteria example) {
        return this.pRolePermissionMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pRolePermissionMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PRolePermission record) {
        return this.pRolePermissionMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PRolePermission record) {
        return this.pRolePermissionMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pRolePermissionMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PRolePermission record, Criteria example) {
        return this.pRolePermissionMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PRolePermission record, Criteria example) {
        return this.pRolePermissionMapper.updateByExample(record, example);
    }

    public int insert(PRolePermission record) {
        return this.pRolePermissionMapper.insert(record);
    }

    public int insertSelective(PRolePermission record) {
        return this.pRolePermissionMapper.insertSelective(record);
    }
}